package main

import "net/http"

type responseCapturer struct {
	statusCode int
	body       []byte
}

func (r *responseCapturer) Header() http.Header {
	return nil
}

func (r *responseCapturer) Write(data []byte) (int, error) {
	r.body = append(r.body, data...)
	return len(data), nil
}

func (r *responseCapturer) WriteHeader(statusCode int) {
	r.statusCode = statusCode
}
